let navbarItem = document.querySelectorAll('.item')
for (let i = 0; i < navbarItem.length; i++) {
    navbarItem[i].addEventListener('click', function () {
        for (let i = 0; i < navbarItem.length; i++) {
            navbarItem[i].classList.remove('active')
        }
        this.classList.add('active')
    })
}


//
// function myTimer() {
//     let d = new Date();
//     let t = d.toLocaleTimeString();
//     document.querySelector("span").innerHTML = t;
// }

let a = document.querySelector('span')
let s = 0
let myVar = setInterval(function(){ myTimer() }, 500);
function myTimer() {
    s = s + 1;
    let b = `<span>功德加${s}</span>`;
    a.innerHTML = b;
}
